<?php
/**
 * Created by PhpStorm.
 * User: lzy
 * Date: 2018/11/26
 * Time: 14:58
 */
namespace App\FreeBird\Controllers\Home;
use App\Base\Controllers\Controller;
use App\FreeBird\Contracts\AutomaticInterface;

class AutomaticController extends Controller
{
    /**
     * 自动接单接口
     * @return AutomaticInterface
     */
     public function getAutomaticInterface(){
         return app()->make(AutomaticInterface::class);
     }

    /**
     * 自动接单
     */
     public function acceptAutomatic(){
        return $this->getAutomaticInterface()->add([]);
     }

     public function cancelAutomatic(){
         $where=function($query){
              $query->where("uid",AUID);
         };
         return $this->getAutomaticInterface()->cancel($where);
     }




}